import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'home',
      component: () => import('@/views/HomeView.vue')
    },
    {
      path: '/category',
      name: 'category',
      component: () => import('@/views/CategoryView.vue')
    },
    {
      path: '/cart',
      name: 'cart',
      component: () => import('@/views/CartView.vue')
    },
    {
      path: '/mine',
      name: 'mine',
      component: () => import('@/views/MineView.vue')
    },
    {
      path: '/provide',
      name: 'provide',
      component: () => import('@/views/kuaji/Provideview.vue')
    },
    {
      path: '/zhiling',
      name: 'zhiling',
      component: () => import('@/views/zhiling/Zhiling.vue')
    },
    {
      path: '/piniauser',
      name: 'piniauser',
      component: () => import('@/views/pinia/PiniaViewUser.vue')
    },
    {
      path: '/piniashop',
      name: 'piniashop',
      component: () => import('@/views/pinia/PiniaViewShop.vue')
    }
  ]
})

export default router
